package cool.qingqing.lambda;

/**
 * @author 高山青
 * @Date 2022/1/2  -   16:43
 */

/**
 * lambda表达式的简写
 */
public class LambdaDemo04 {
	public static void main(String[] args) {
		//注意参数，返回值
		String student=getStudnet((String name,int age)->name+age);
		System.out.println(student);
		//注意参数，返回值
		String name=getName(nam -> nam+"6666");
		System.out.println(name);

	}
	public static String getStudnet(Student student){
		return student.getStudnet("张三",21);
	}
	public static String getName(OderService oderService){
		return oderService.getName("高山青");
	}
}
interface Student {
	String getStudnet(String name, int age);
}
interface OderService{
	String getName(String name);
}